import React, { Component } from 'react';
import './MyInput.scss'
import { withRouter } from 'react-router-dom'

class MyInput extends Component {

    handleChange() {
        this.props.history.push('/search')
    }

    render() {
        return (
            <input type="text" placeholder='请输入商品' onClick={() => { this.handleChange() }} />
        );
    }
}

export default withRouter(MyInput);